Laser scanners are widely used for reading bar codes, including one dimensional and two dimensional bar codes. In a laser scanner, a laser generates a beam, the beam is scanned or rapidly moved across a bar code or a portion of a bar code. Typically, the laser beam is focused by a lens and repetitively scanned by means of an oscillating or rotating mirror. Essentially, the beam generates a beam spot that moves across a target bar code.
The space elements of the bar code reflect the laser beam illumination and the dark or black bar elements of the bar code absorb the laser beam. The reflected light from the bar code is focused by scanner light-receiving optics through a bandpass filter and onto a photodetector circuitry, such as a photodiode. The pattern of reflected light, as received by the photodiode of the laser scanner, is a representation of the pattern of the bar code. That is, a sequence of time when the photodiode is receiving reflected light represents the laser beam spot moving across a space of the bar code, while a sequence of time when the photodiode is not receiving reflected light represents the laser moving across a dark bar. Since the scanning speed or velocity of the laser is known, the elapsed time of the photodiode receiving reflected light can be converted into a width of a bar code element corresponding to a space, while the elapsed time of the photodiode not receiving reflected light can be converted into a width of a bar code element corresponding to a bar.
The photodiode is part of photodiode circuitry which converts the reflected light into an analog signal. The laser scanner includes a digitizer to digitize the analog signal generated by the photodiode. The digitizer outputs a digital bar code pattern (DPB) signal representative of the bar code pattern. A decoder of the laser scanner inputs the DPB signal and decodes the bar code. The decoded bar code typically includes payload information about the product that the bar code is affixed to. Upon successful decoding of the scanned bar code, the scanner may provide an audio and/or visual signal to an operator of the scanner to indicate a successful read and decode of the bar code. The scanner typically includes a display to display payload information to the operator and a memory to store information decoded from the bar code.
To successfully read and decode a bar code, the digitizer must accurately interpret the analog signal output by the photodiode circuitry and determine where the edges, that is, the transition points of successive bar code elements are. Noise makes the digitization process problematic. Noise can include optical noise such as ambient light, paper grain or speckle noise, printing defects. Noise may also include electrical sources of noise such as radiated (EMI) or conducted (scanner circuitry induced noise). A digitizer must differentiate the signal representative of the bar code pattern from various sources of noise. Typically, digitizers use an edge detection process wherein an edge transition (black to white (bar to space) or white to black (space to bar)) between bar code elements is deemed to have been detected only if the level of the differentiated signal is above a specified or predetermined threshold. Additional criteria that may be used include amount of signal drop from its pick value or changing of direction of the differentiated signal. Such features give the digitizer a degree of noise immunity, that is, reducing the possibility that edge detection was triggered by noise rather than the bar code element edge transition.
The edge detection process of the digitizer also requires that the edge polarities have to alternate. Edge polarity tells whether the edge marks a transition from space to a bar (positive-going edge or positive edge) or a transition from bar to a space (negative-going edge or negative edge). By requiring alternating edges, the edge detection process ensures that the resulting DBP signal represent a sequence of bar code elements that are properly ordered as: bar-space-bar-space-bar-space, etc.
Alternating polarity edge detection is suitable when the analog bar code signal from the photodiode is not noisy. However, noise and the convolution effect of the laser beam may cause a distortion of the photodiode analog signal such that two or more consecutive edges of the signal may have the same polarity. Empirical evidence suggests that when the signal-to-noise ratio (SNR) of the analog signal drops below a certain value, the probability of such a situation increases significantly and at SNR<=8 dB consecutive edges having the same polarity becomes very likely.
FIG. 1 illustrates the problem with alternating edge polarity edge detection. FIG. 1 is a plot of analog voltage output of photodiode circuitry (including voltage control circuitry and a differentiator) versus time. Typically, the analog voltage output 30 is the first derivative of the photodiode current. A negative polarity edge labeled A is below a predetermined edge detection threshold −T. (The edge detection threshold −T may be a static value or a dynamic value which changes based on various scanning parameters.) Thus, a digitizer utilizing alternating edge polarity will toggle the DBP line low at the location of point A, signaling the beginning of a space of the bar code pattern. The next edge B is above a positive edge threshold +T and would cause the digitizer to toggle the DBP line high. However, edge B is caused by noise and, in fact, edge C should be the proper transition point between bar code elements E1 and E2 rather than point B. However, since the transition of the DBP signal has already occurred at edge B, it can not be reversed at edge C since edges B and C are of the same polarity. The digitizer will toggle the DBP line low next at edge D, an edge with negative polarity marking the end of the bar representing element E2.
What this means is that the decoder receiving the DBP signal as an input will calculate a width of both successive bar code elements E1, E2 improperly. The DBP signal output by the digitizer will result in the decoder calculating the width of bar code element E1 as corresponding to the elapsed time (where elapsed time is the surrogate of distance or element width) between edges A and B, when element E1 should correctly have a width corresponding to the elapsed time between edges A and C. Thus, the calculated width of element E1 will be too short. Similarly, the DBP signal output by the digitizer will result in the decoder calculating the width of bar code element E2 as corresponding to the elapsed time between edges B and D, when element E2 should correctly have a width corresponding to the elapsed time between edges C and D. Thus, the calculated width of element E1 will be too long. If the width error of element E1 exceeds the narrowest element width for the bar code, the decoder will incorrectly read the bar width of point B to point D as including one extra bar code element width. Another similar case is marked as points X, Y, Z. In both situations, the digitizer error leads to an error in bar code element width. This has disastrous consequences for the scanner decoder. In case of symbologies, which use all element combinations, like UPC such situation leads to character misclassification. That results in a failure to decode, however if more than one such error occurs for a single symbol, then that may result in symbol misdecode. The danger of misdecode is increased, if a symbol is decoded using fragments of a bar code coming from separate scans, like it is in case of block decoding or even more often in the case of half block stitching.
What is needed is a digitizer which mitigates DBP distortion resulting from receiving an analog signal having two successive edges of the same polarity.